<!--
  @author heguanghua
  @since 2019/06/12 19:34
-->
<!DOCTYPE html SYSTEM "http://www.thymeleaf.org/dtd/xhtml1-strict-thymeleaf-4.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xmlns:th="http://www.thymeleaf.org">

<table class="layui-hide" id="zmn-table" lay-filter="zmn-table" th:fragment="table">
    <thead>
    <tr>
        <th lay-data="{field:'staffId', width:190, unresize:true, align:'center'}">员工ID</th>
        <th lay-data="{field:'staffName', unresize:true, align:'center',width:180}">账号</th>
        <th lay-data="{field:'realName', unresize:true, align:'center',width:180}">真实姓名</th>
<!--        <th lay-data="{field:'payment', unresize:true, align:'center',width:180}">工号</th>-->
        <th lay-data="{field:'roleType', unresize:true, align:'center',width:200}">类型</th>
        <th lay-data="{field:'deptOneId', unresize:true, align:'center'}">部门</th>
        <th lay-data="{field:'deptTwoId', unresize:true, align:'center'}">岗位</th>
        <th lay-data="{field:'status', unresize:true, align:'center'}">状态</th>
        <th lay-data="{field:'操作', width:200, unresize:true, align:'center', fixed:'right'}">操作</th>
    </tr>
    </thead>

    <tbody>
    <tr th:each="item:${items}">
        <td th:text="${item.staffId}">staffId</td>
        <td th:text="${item.staffName}">staffName</td>
        <td th:text="${item.realName + '_' + item.mobile}">realName</td>
        <td th:text="${item.roleType == 2 ? '普通员工': '师傅'}">roleType</td>
        <td>
            <div th:text="${item.deptOneName}" th:if="${(item.deptTwoId == null || item.deptTwoId == 0 || item.deptTwoId == 1) && (item.deptThreeId == null || item.deptThreeId == 0 || item.deptThreeId == 1)}">
            </div>
            <div th:text="${item.deptOneName}" th:if="${(item.deptThreeId == null || item.deptThreeId == 0 || item.deptThreeId == 1) && item.deptTwoId > 1}">
            </div>
            <div th:text="${item.deptTwoName}" th:if="${item.deptOneId > 1 && item.deptTwoId > 1 && item.deptThreeId > 1}">
            </div>
        </td>
        <td>
            <div th:if="${(item.deptTwoId == null || item.deptTwoId == 0 || item.deptTwoId == 1) && (item.deptThreeId == null || item.deptThreeId == 0 || item.deptThreeId == 1)}">
            </div>
            <div th:text="${item.deptTwoName}" th:if="${(item.deptThreeId == null || item.deptThreeId == 0 || item.deptThreeId == 1) && item.deptTwoId > 1}">
            </div>
            <div th:text="${item.deptThreeName}" th:if="${item.deptOneId > 1 && item.deptTwoId > 1 && item.deptThreeId > 1}">
            </div>
        </td>
        <td th:text="${item.status == 2 ? '正常': '停用'}">status</td>
        <td>
            <a th:if="${#authPermit.checkPermit('/msg/conf/receive/staff/delete.action')}" style="color: #00a0e9;cursor:pointer" th:onclick="deleteMsgConfStaff([[${item.id}]]);">删除</a>
        </td>
    </tr>
    </tbody>
</table>
